//
// Created by 12992 on 24-10-1.
//

#ifndef MEDIA_FRAME_H
#define MEDIA_FRAME_H

extern "C" {
struct AVFrame;
}

namespace utils
{
    class media_frame
    {
    public:
        media_frame() = default;

        explicit media_frame(AVFrame* frame);

        media_frame(const media_frame& frame);

        media_frame(media_frame&& frame) noexcept;

        media_frame& operator=(const media_frame& frame);

        media_frame& operator=(media_frame&& frame) noexcept;

        ~media_frame();

        AVFrame* get_frame();

        explicit operator bool() const noexcept;

    private:
        AVFrame* m_frame{};
    };
} // utils

#endif //MEDIA_FRAME_H
